<?php
class page extends skeleton {
	function get_content($format = true) {
		return ($format === true) ? autop(abbr($this->content)) : $this->content;
	}
	
	function get_date($format = 'F j, Y @ g:ia') {
		return get_date($format, $this->date, true);
	}
	
	function get_permalink($format = true, $options = array()) {
		$permalink = (get_option('pretty_permalinks')) ? get_option('site_path').'p/'.$this->title_slug.'/' : get_option('site_path').'?p='.$this->title_slug;
		
		if ($format === true) {
			$options = array_merge(array(
				'text' => $this->get_title(),
				'title' => $this->get_title(),
				'class' => ''
			), (array)$options);
			$options['href'] = $permalink;
			
			$permalink = make_link($options);
		}
		
		return $permalink;
	}
	
	function get_slug() {
		return $this->title_slug;
	}
	
	function get_news() {
		return $this->news;
	}
	
	function get_titletag()
	{
		return $this->titletag;
	}
	
	function get_metatag()
	{
		return $this->metatag;
	}
	
	function get_status() {
		return (bool)$this->status;
	}
	
	function get_title() {
		return htmlspecialchars($this->title);
	}
	
	function the_content($format = true) {
		echo $this->get_content($format);
	}
	
	function the_date($format = 'F j, Y @ g:ia') {
		echo $this->get_date($format);
	}
	
	function the_permalink($format = true, $options = array()) {
		echo $this->get_permalink($format, $options);
	}
	
	function the_slug() {
		echo $this->get_slug();
	}
	
	function the_news() {
		echo $this->get_news();
	}
	
	function the_title() {
		echo $this->get_title();
	}
}
?>